package org.ccheng.xztx.service.impl;

import org.ccheng.xztx.domain.UserInfo;
import org.ccheng.xztx.service.UserService;
import org.ccheng.xztx.util.Api;
import org.ccheng.xztx.util.ApiConstants;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class UserServiceImpl implements UserService {

    @Override
    public UserInfo findById(String userId) {
        Map<String, Object> params = new HashMap<>();
        if (userId != null)
            params.put("userId", userId);
        return Api.get(ApiConstants.API_USER_INFO, params, UserInfo.class);
    }
}
